var store = {
  data:{
    lineInfo:{name:'L01',staffCount:25},
    mosList:[{mo:'MO12345677',qty:1234},{mo:'MO12345678',qty:10800}],
    processList:[{mo:'PCBA打标机',qty:1234566},{mo:'SMT',qty:1234566},{mo:'AI',qty:1234566},{mo:'异插',qty:1234566},
      {mo:'组装',qty:1234566},{mo:'老化',qty:1234566},{mo:'包装',qty:1234566},],
    managerList:[
      [{position:'生产经理',name:'周双润',photo:'http://127.0.0.1:8013/files/%E5%88%98%E8%8A%B32.png'},
        {position:'生产主管',name:'周双润1',photo:'http://127.0.0.1:8013/files/%E6%9D%A8%E8%90%8D1.png'},
      ],
      [{position:'生产经理2',name:'周双润',photo:'http://127.0.0.1:8013/files/%E6%9D%A8%E8%90%8D1.png'},
        {position:'生产主管2',name:'周双润2',photo:'http://127.0.0.1:8013/files/%E6%9D%A8%E8%90%8D1.png'},
      ],
      [{position:'生产经理3',name:'周双润',photo:'http://127.0.0.1:8013/files/%E6%9D%A8%E8%90%8D1.png'},
        {position:'生产主管3',name:'周双润2',photo:'http://127.0.0.1:8013/files/%E6%9D%A8%E8%90%8D1.png'},
      ],
      [{position:'生产经理4',name:'周双润',photo:'http://127.0.0.1:8013/files/%E6%9D%A8%E8%90%8D1.png'},
        {position:'生产主管4',name:'周双润2',photo:'http://127.0.0.1:8013/files/%E6%9D%A8%E8%90%8D1.png'},
      ],
    ],
    deviceList:[
      {device:'PCBA打标机',data:["12342","52322","52322","52322","52322","52322","52322","52322","23522","2652352","52322","52320","1234566","100%","101%"]},
      {device:'SMT',data:["12342","52322","52322","52322","52322","52322","52322","52322","52322","52320","23522","2652352","1234566","100%","101%"]},
      {device:'AI',data:["12342","52322","52322","52322","52322","52322","52322","52322","52322","52320","23522","2652352","1234566","100%","101%"]},
      {device:'异插',data:["12342","52322","52322","52322","52322","52322","52322","52322","52322","52320","23522","2652352","1234566","100%","101%"]},
      {device:'组装',data:["2232","2322","2422","2622","2322","2322","2322","2322","2322","2320","23522","2652352","1234566","100%","101%"]},
      {device:'老化',data:["2232","2322","2422","2622","2322","2322","2322","2322","2322","2320","23522","2652352","1234566","100%","101%"]},
      {device:'包装',data:["2232","2322","2422","2622","2322","2322","2322","2322","2322","2320","23522","2652352","1234566","100%","101%"]}
    ],
    fqcList:[ {mo:'当天送检批次数',qty:10}, {mo:'当天合格批次数',qty:9}],
    viQcList:[{name:'胶壳脏污',value:10},{name:'保护膜不良',value:5},{name:'胶壳损伤',value:2}],
    runInList:[{name:'无输出',value:12},{name:'静态波纹失败',value:15},{name:'输出电压不符合',value:3}],
    qcList:{}},

  qcList: {
    category: [
      "11-18",
      "11-19",
      "11-20",
      "11-21",
      "11-22",
      "11-23"
    ],
    aoiData: [
      95.3,
      92.3,
      91.3,
      96.3,
      93.62,
      97.2
      /*0.953,
      0.923,
      0.913,
      0.963,
      0.9362,
      0.972*/
    ],
    volData: [
      92.32,
      93.16,
      94.3,
      95.3,
      97.62,
      93.28
      /*0.923,
      0.933,
      0.943,
      0.953,
      0.9762,
      0.932*/
    ],
    ateData: [
      94.13,
      96.23,
      94.67,
      93.21,
      98.62,
      97.27
      /*0.943,
      0.963,
      0.923,
      0.933,
      0.9862,
      0.912*/
    ],
    rateData: [
      95.2,
      96.13,
      94.3,
      91.3,
      94.5,
      96.2
    ]
  },
  setData(resData){
    this.data=resData
    this.qcList=this.data.qcList
  },
  fmtNum(n,s,f){
    let str,xs
    n=n+''
    if (n.includes('.')){
      str=n.split('.')[0]
      xs=n.split('.')[1]
    }
    else{
      xs=''
      str=n
    }
    var re=/(?=(?!(\b))(\d{3})+$)/g;
    str=str.replace(re,",");
    if (xs!=''){
      str=str+'.'+xs
    }
    return (((f?f:" ").repeat(s)) + str).slice(-s)
  },
}
export default store
